function [ ] = fftToScreen(x)
    % general parameters
    speedOfLight = 299792458;
    magneticPermeability0 = 4.0 * pi * 1.0e-7;
    electricalPermittivity0 = 1.0 / (speedOfLight * speedOfLight * magneticPermeability0);  
    
    figure (3); % set second figure
    dt =100e-9 / (2*speedOfLight); % sampling space
    % set frequancies for tranform
    f=[1:0.00001: 4];
    f=f.*1e14; 
    Fs = 1/dt; %sampling frequency
    N = length(x)	%Number of points
    % generate hamming window
    h = hamming (length(x));
    freq_indices = round(f/Fs*N)+1;   
    %Compute DFT using Goertzel algorithm
    dft_data = goertzel(x.*h,freq_indices); 
    %Plot the DFT magnitudes
    wavelegnth = speedOfLight./f;
    plot(wavelegnth,abs(dft_data).*abs(dft_data));     %set(gca,'xtick',0:100:1e6); xlabel('');
    xlabel ('wavelength (nm)');
    ylabel('amplidute (Arbitrary)');
    
    %calculate energies of pump and stokes beams
    %
    %intensities = (abs(dft_data)/(N/2)).*(abs(dft_data)/(N/2));
    %[peakLoc, peakMag]=peakfinder (intensities, (max (intensities)-min(intensities))/4,0.5e22,1) ;
    %numOfPeaks = size(peakMag);
    %numOfPeaks = numOfPeaks(2);
    %pumpOutEnergy = speedOfLight*electricalPermittivity0 *peakMag(1)*2*pi*w0*w0*measureTime*2
    %if (numOfPeaks>1) 
    %    stokesOutEnergy = speedOfLight*electricalPermittivity0 *peakMag(2)*2*pi*w0*w0*measureTime*2
    %end

end

